import { Link, useLocalSearchParams, useRouter } from "expo-router";

import { Text, StyleSheet } from "react-native";

export default function Page() {
  const { id } = useLocalSearchParams();
  const router = useRouter();

  return (
    <>
      <Text>Blog post: {id}</Text>
      {/* 关闭当前屏幕 */}
      <Text style={styles.text} onPress={() => router.dismissAll()}>
        首页
      </Text>
    </>
  );
}
const styles = StyleSheet.create({
  text: {
    color: "#000",
  },
});
